package com.yiyi.credit.manage.sso.common.page;


public class PageUtils {


    public static String getPageCommonSql(String selectFiled, String fromInfo, String whereSql, String order) {
         String sql="SELECT " + selectFiled + fromInfo + whereSql + " ORDER BY " + order;
            return sql;
    }


    public static String getPageCountSql(String countFiled, String fromInfo, String whereSql) {
        return "SELECT " + countFiled + fromInfo + whereSql;
    }


    public static Integer getPage(Long recordsTotal, Integer length) {
        return (recordsTotal.intValue() + length - 1) / length;
    }
}
